/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.riversoft.weixin.gateway.service;

import com.riversoft.weixin.gateway.service.model.WxUserBind;
import com.riversoft.weixin.gateway.service.repo.WxUserRepository;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 *
 * @author johns
 */
@Service
public class WxUserServiceImpl implements WxUserService {
    
    @Autowired
    private WxUserRepository repo;
    
    @Override
    public List<WxUserBind> findByTel(String tel) {
        return repo.findByTel(tel);
    }

    @Override
    public WxUserBind findById(String openId) {
        return repo.getOne(openId);
    }

    @Override
    public WxUserBind save(WxUserBind user) {
        return repo.save(user);
    }
}
